name: Read the Docs Preview
on:
  pull_request_target:
    types:
      - opened
    paths:
      - "docs/**"

permissions:
  pull-requests: write

jobs:
  pull-request-links:
    runs-on: ubuntu-latest
    steps:
      - uses: readthedocs/actions/preview@v1
        with:
          project-slug: ${{ secrets.READTHEDOCS_PROJECT_SLUG }} 
          single-version: 'false'
          project-language: ""
